<template>
	<view>
		<!-- Loading 加载动画 -->
		<u-loading :show="sourceGet" mode="circle" size="50" color="#0055ff" class="uLoadBox"></u-loading>
		<view class="order" v-for="m in myResumeList" :key="m._id">
		<!-- 文字 -->
			<view class="item">
				<view class="content">
					<view class="title u-line-2">{{m.file_name}}</view>
					<view class="type">{{m.time}}</view>
					<!-- <view class="type ">123asdfasfd1公司性质</view> -->
				</view>
			<!-- 按钮	 -->
			<view class="right">
			<!-- 使用官网的方法报错，设置不了请求头	uniapp chunk-vendors.js:186 Refused to get unsafe header "content-disposition" -->
			<!-- <u-button  type="primary" style="margin: 15px;" size="mini" @click="fleDowmLoad(m.url)">下载</u-button> -->
			<!-- h5端方式 -->
			<a :href="m.url" style="margin: 15rpx; margin-top: 20rpx;" >下载</a>
			</view>				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				myResumeList:[],
				sourceGet:true
			}
		},
		methods: {
			showMyResume(){
				//在附件表中添加一条附件信息
				uniCloud.callFunction({
										name: "resume",
										data: {	
											user_id:uni.getStorageSync('storage_user')!=''?uni.getStorageSync('storage_user').data[0]._id:'',
											type: "showAllResume"
										},
										success: (res) => {
											// console.log("error！",res);
											// console.log(res.result.data)
											if(res.result.data===''){
												// console.log("error！",res);
													return;
											}
											//成功
											//赋值
											res.result.data
											console.log(res.result.data.data)
											this.myResumeList=res.result.data.data
											this.sourceGet=false
										},
										fail: (err) => {
											console.log(err)
										}
									})
			},
			//文件下载
			fleDowmLoad(url){
				// console.log(url)
			},

		},
		onLoad(){
			this.showMyResume()
			
		}
	}
</script>

<style lang="scss" scoped>
	.uLoadBox{
		 margin-top: 350rpx ;
		 margin-left: 350rpx;
		 // text-align: center;
		}
	page{
		background: #eeeef6;
	}
	.topbox{
		display: flex;
		background-color: #edf0f6;
		height: 200rpx;
	}
	.rightbox{
		flex:2;
		width:100%;
		/* background-color: #18B566; */
	}
	.leftbox{
		flex: 1;
		/* background-color: #82848A; */
		text-align: center;
		line-height: 200rpx;
	}
	.uni-scroll-view{
		height: 500rpx;
	}
	.footbox{
		position: fixed;
		bottom: 10rpx;
		height: 70rpx;
		right: 270rpx;
	}
.order {
	width: 710rpx;
	background-color: #ffffff;
	margin: 20rpx auto;
	border-radius: 20rpx;
	box-sizing: border-box;
	padding: 20rpx;
	font-size: 28rpx;
	.top {
		display: flex;
		justify-content: space-between;
		.left {
			display: flex;
			align-items: center;
			.store {
				margin: 0 10rpx;
				font-size: 32rpx;
				font-weight: bold;
			}
		}
		.right {
			color: $u-type-warning-dark;
		}
	}
	.item {
		display: flex;
		margin: 20rpx 0 0;
	
		.left {
			margin-right: 20rpx;
			image {
				width: 200rpx;
				height: 200rpx;
				border-radius: 10rpx;
			}
		}
		.content {
			.title {
				font-size: 28rpx;
				line-height: 50rpx;
			}
			.type {
				margin: 10rpx 0;
				font-size: 24rpx;
				color: $u-tips-color;
			}
			.delivery-time {
				color: #e5d001;
				font-size: 24rpx;
			}
		}
		.right {
			// background-color: yellow;
			width: 250px;
			margin-left: 10rpx;
			padding-top: 20rpx;
			text-align: right;
			.decimal {
				font-size: 24rpx;
				margin-top: 4rpx;
			}
			.number {
				color: $u-tips-color;
				font-size: 24rpx;
			}
		}
	}
	.total {
		margin-top: 20rpx;
		text-align: right;
		font-size: 24rpx;
		.total-price {
			font-size: 32rpx;
		}
	}
	.bottom {
		display: flex;
		margin-top: 40rpx;
		padding: 0 10rpx;
		justify-content: space-between;
		align-items: center;
		.btn {
			line-height: 52rpx;
			width: 160rpx;
			border-radius: 26rpx;
			border: 2rpx solid $u-border-color;
			font-size: 26rpx;
			text-align: center;
			color: $u-type-info-dark;
		}
		.evaluate {
			color: $u-type-warning-dark;
			border-color: $u-type-warning-dark;
		}
	}
}
.order .item .right[data-v-74d0bef4] {
    width: 300px;
}
</style>
